<?php

namespace App\Admin;

use Illuminate\Database\Eloquent\Model;

class Paper extends Model
{
    //定义表
    protected $table  = 'paper';
    public $timestamps = false;
    //关联试卷的表
    public function category(){
    	return $this -> hasOne('App\Admin\Category','id','category_id');
    }

    protected $fillable = [
    	'id','category_id','question','answer','goal','addtime','isdel'
    ];

}
